import request from '@/utils/request'

// 查询材料采购记录列表
export function listMaterialPurchase(query) {
  return request({
    url: '/material/materialPurchase/list',
    method: 'get',
    params: query
  })
}

// 查询材料采购记录详细
export function getMaterialPurchase(purchaseRecordId) {
  return request({
    url: '/material/materialPurchase/' + purchaseRecordId,
    method: 'get'
  })
}

// 新增材料采购记录
export function addMaterialPurchase(data) {
  return request({
    url: '/material/materialPurchase',
    method: 'post',
    data: data
  })
}

// 修改材料采购记录
export function updateMaterialPurchase(data) {
  return request({
    url: '/material/materialPurchase',
    method: 'put',
    data: data
  })
}

// 删除材料采购记录
export function delMaterialPurchase(purchaseRecordId) {
  return request({
    url: '/material/materialPurchase/' + purchaseRecordId,
    method: 'delete'
  })
}
